#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'ethereal'
__mtime__ = '2018/8/23'

SERVER_PORT = 8999
DEBUG = False
SQLALCHEMY_ECHO = False

# cookie名称
AUTH_COOKIE_NAME = 'mooc_food'

# 过滤url
IGNORE_URLS = [
    "^/user/login",
    "^/api"
]

# 完全不用判断的url类型
IGNORE_CHECK_LOGIN_URLS = [
    "^/static",
    "^/favicon.ico"
]

API_IGNORE_URLS = [
    "^/api"
]

# 每页数量
PAGE_SIZE = 50
PAGE_DISPLAY = 10

# 上传配置
UPLOAD = {
    'ext': ['jpg', 'gif', 'bmp', 'jpeg', 'png'],#允许的扩展名
    'prefix_path': '/web/static/upload/',  # 前置地址
    'prefix_url': '/static/upload/'
}

#前端状态值保存
STATUS_MAPPING = {
    "1": "正常",
    "0": "已删除"
}
#
APP = {
    'domain': 'http://127.0.0.1:8999'
}



MINA_APP = {
    'appid': 'wx5c6505011b4f5a4c',
    'appkey': '683a00744db766b7c71f6edd1bc87996'
}



PAY_STATUS_MAPPING = {
    "1":"已支付",
    "-8":"待支付",
    "0":"已关闭"
}

PAY_STATUS_DISPLAY_MAPPING = {
    "0":"订单关闭",
    "1":"支付成功",
    "-8":"待支付",
    "-7":"待发货",
    "-6":"待确认",
    "-5":"待评价"
}
